Welcome Guest, you are in: Login
CTS Futures

Order Cancel Replace Request

RSS

Amending Working Orders

The Order Cancel-Replace Request message (MsgType=G) is used by the T4 FIX API to electronically amend (i.e. revise) the replaceable fields of working orders. This message is used for all CTS strategy types including outright futures, futures options, spreads and multileg strategies.

The instrument (for which the replace applies) is identified with the following tags: Tag 48 (SecurityID), Tag 55 (Symbol) Tag 207 (SecurityExchange) and Tag 167 (SecurityType). Options orders must also include the Strike Price (Tag 202) and the PutOrCall indicator (Tag 201).

In addition to full market specification, all cancel-replaces must be uniquely identified with a verbose (# characters >= 12 and <= 20) Client Order Id (Tag 11). The subscribed account (for which the replace order is submitted) must also be entered.

Replaceable Fields

The fields that can be replaced are:
TagTag NumberComments
Order Quantity38For all Orders
Price44For Limits, Stop Limits and Market-If-Touched
Stop Price99For Stops and Stop Limits
MaxShow210For Icebergs (if supported by Exchange)
Trailing Delta10100For Trailing Stops
Activation Value10103For Activation Orders

Identifying the Order to be Replaced

Working orders to be replaced can be identified with the working order (client-side) identifier or the (T4 FIX API generated) order identifier. For the replace message, the OrigClOrdId (Tag 41) and the OrderId (Tag 37) are the corresponding fields. Working orders that have experienced previous rejections can subsequently be replaced with OrderId (Tag 37) or by using the ClOrdId (Tag 11) of the previous rejection.

Orders submitted outside the T4 FIX API (e.g. with the CTS T4 Front-End and/or custom T4 API application) can only be replaced with OrderId (Tag 37). In this case, as OrigOrdClId is undetermined but is a required tag for the replace order, the OrigOrdClId (Tag 41) is set to the value of the OrderId (Tag 37). To cover all scenarios, it is recommended that both OrigClOrdId (Tag 41) and OrderId (Tag 37) be specified for all cancel-replaces.

Activating Queued Orders

For the specific case of Queue Orders, the cancel replace message is used to activate a (held/suspended) queued order. In addition to specifying the correct market and its target order id, the Activation Value (Tag 10102) must be set to -1.

Important Considerations

Note that malformed replace orders (including missing required tags, empty tags, invalid tag value range, etc.) will be rejected with a FIX Session Reject message. Application level rejections are manifested with Cancel Reject messages.

Please note that all order routing including the submission of cancel-replace orders must be preceded by a successful subscription to the account the cancel-replace is submitted for. Please refer to the Collateral Inquiry message on how to subscribe to customer accounts.

Contigent (multiple-component) orders like OCO's and AutoOCO's can only be replaced one component at a time. The individual components are identified by their OrigClOrdID (Tag 41) and/or (Tag 37) OrderID as explained above.


Message Dictionary

TagField NameReq'dComments
Standard HeaderYMsgType = G
1AccountYAccount (code) for which the order is submitted.
11ClOrdIDY(Client-Side) identifier for this replace order. Must be unique. Maximum number of characters: 20.
41OrigClOrdIDY(Client-Side) ClOrdID of the target working order. (NOT the initial order of the chain). Maximum number of characters: 20.
37OrderIdYUnique identifier (previously assigned by T4 API servers) of the target working order. OrderId uniqueness is guaranteed across all trading sessions regardless of order origin.
48SecurityIDYSecurity identifier. This is the T4 Market ID.
55SymbolYSymbol. This is the T4 Contract ID.
207SecurityExchangeYExchange at which the security trades. This is the T4 Exchange ID.
167SecurityTypeYInstrument type. Futures="FUT", Options="OPT", Stock="STK", Synthetic="SYN", Binary Option="BIN"
201PutOrCallNFor Options. Indicates whether an Option is for a Put or Call. Valid values are:
0 = Put
1 = Call
202StrikePriceNFor Options. Indicates the Strike Price of the Option.
54SideYSide of the market. Valid values are:
0 = None (used for Flatten orders)
1 = Buy
2 = Sell
38OrderQtyYThe number of contracts to be replaced. For partially filled orders, this value reflects the working order's original Quantity (OrderQty) and not its remaining (unfilled) quantity.
210MaxShowNMaximum quantity of order contracts to be shown to other market participants. Only supported by certain exchanges.
40OrdTypeYOrder Type (in reference to Price). Refer to T4 User Guide for details on Special Order Types. Note that some order types cannot practically be replaced (e.g. Flatten, Hit and Market). The valid order type values are:
1 = Market
2 = Limit
3 = Stop
4 = Stop-Limit
J = Market If Touched
F = Flatten
N = Join
H = Hit
44PriceNOrder Price. Required for Limit, Stop-Limit and Market-if-Touched order types. Auto OCO: Value is relative from the Trigger Price (Tag 10101). Negative value is allowed.
99StopPxNStop Order Price. Required for Stops and Stop-Limit order types. Auto OCO: Value is relative from the Trigger Price (Tag 10101). Negative value is allowed.
59TimeInForceYSpecifies how long the order remains in effect. Valid values are:
0 = Day
1 = Good Til Cancel
3 = Immediate Or Cancel
4 = Fill Or Kill
200MaturityMonthYearNTime Maturity of the Security. Specified in the format YYYYMM (e.g. 201212)
60TransactTimeYTime this order was requested for. Specified in UTC form.
21HandlInstNInstructions for order handling on Broker trading floor. Valid values are:
1 = Automated execution order, private, no Broker intervention. Default.
2 = Automated execution order, public, Broker intervention OK
3 = Manual order, best execution
77OpenCloseNIndicates whether the resulting position (after a trade) should be an opening position or closing position.
O = Open
C = Close
58TextNFree form Text.
107SecurityDescNDescription of the specified Security ID (Tag 48)
1028ManualOrderIndicatorNIndicates if the order was sent Manually (i.e. order action is immediate from a human). Valid values are:
Y = Order was entered Manually
N = Order was entered by an Automated System, Program or Algorithm
10100TrailingDeltaNPrice amount by which a Stop order will trail the current market. Only used for Trailing Stops.
10103ActivationValueNCondition associated with Activation Type. Multiple values are delineated by a colon (";"). Refer to T4 API Guide for Activation Value rules.
Standard TrailerY


Sample Messages

Replacing a Working Order entered through the T4 FIX API


[FIXCANCELREPLACE] 34=121|49=T4Example|56=T4|50=TraderName|52=20121212-16:43:37.426|1=Account1|11=fr-634909058174264921|41=fn-634909058088464770|37=C8D64D65-7FCD-472B-9A55-3E77F404F1BE|48=CME_20121200_ESZ2|55=ES|207=CME_Eq|54=1|38=1|40=2|44=143025|59=0|167=FUT|21=1|60=20121212-16:43:37.426|204=0|

[MsgSeqNum] 34 = 121
[SenderCompID] 49 = T4Example
[TargetCompID] 56 = T4
[SenderSubID] 50 = TraderName
[SendingTime] 52 = 20121212-16:43:37.426
[Account] 1 = Account1
[ClOrdID] 11 = fr-634909058174264921
[OrigClOrdID] 41 = fn-634909058088464770
[OrderID] 37 = C8D64D65-7FCD-472B-9A55-3E77F404F1BE
[SecurityID] 48 = CME_20121200_ESZ2
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[Side] 54 = 1 (BUY)
[OrderQty] 38 = 1
[OrdType] 40 = 2 (LIMIT)
[Price] 44 = 143025
[TimeInForce] 59 = 0 (DAY)
[SecurityType] 167 = FUT (FUTURE)
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[TransactTime] 60 = 20121212-16:43:37.426
[CustomerOrFirm] 204 = 0 (CUSTOMER)

[fixexecutionreport] 34=5702|49=T4|56=T4Example|50=T4FIX|52=20121212-16:43:37.457|143=US,IL|1=Account1|11=fr-634909058174264921|41=fn-634909058088464770|17=48187.71332576498_ESZ2.63490905838440000012.1.C8D64D65|150=5|37=C8D64D65-7FCD-472B-9A55-3E77F404F1BE|39=5|48=CME_20121200_ESZ2|55=ES|207=CME_Eq|200=201212|59=0|107=E-mini S&P 500 Dec12|54=1|167=FUT|38=1|40=2|44=143025|60=20121212-16:43:58.440|

[MsgSeqNum] 34 = 5702
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20121212-16:43:37.457
[TargetLocationID] 143 = US,IL
[Account] 1 = Account1
[ClOrdID] 11 = fr-634909058174264921
[OrigClOrdID] 41 = fn-634909058088464770
[ExecID] 17 = 48187.71332576498_ESZ2.63490905838440000012.1.C8D64D65
[ExecType] 150 = 5 (REPLACE)
[OrderID] 37 = C8D64D65-7FCD-472B-9A55-3E77F404F1BE
[OrdStatus] 39 = 5 (REPLACED)
[SecurityID] 48 = CME_20121200_ESZ2
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201212
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Dec12
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 1
[OrdType] 40 = 2 (LIMIT)
[Price] 44 = 143025
[TransactTime] 60 = 20121212-16:43:58.440


Replacing a Working Order entered through the CTS Front-end


[FIXCANCELREPLACE] 34=6|49=T4Example|56=T4|50=TraderName|52=20121212-18:05:57.929|1=Account1|11=fr-634909107579297721|41=FA657BC9-A1D2-4644-B558-A1155C731DA4|37=FA657BC9-A1D2-4644-B558-A1155C731DA4|48=CME_20121200_ESZ2|55=ES|207=CME_Eq|54=1|38=1|40=2|44=143075|59=0|167=FUT|21=1|60=20121212-18:05:57.929|204=0|

[MsgSeqNum] 34 = 6
[SenderCompID] 49 = T4Example
[TargetCompID] 56 = T4
[SenderSubID] 50 = TraderName
[SendingTime] 52 = 20121212-18:05:57.929
[Account] 1 = Account1
[ClOrdID] 11 = fr-634909107579297721
[OrigClOrdID] 41 = FA657BC9-A1D2-4644-B558-A1155C731DA4
[OrderID] 37 = FA657BC9-A1D2-4644-B558-A1155C731DA4
[SecurityID] 48 = CME_20121200_ESZ2
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[Side] 54 = 1 (BUY)
[OrderQty] 38 = 1
[OrdType] 40 = 2 (LIMIT)
[Price] 44 = 143075
[TimeInForce] 59 = 0 (DAY)
[SecurityType] 167 = FUT (FUTURE)
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[TransactTime] 60 = 20121212-18:05:57.929
[CustomerOrFirm] 204 = 0 (CUSTOMER)

[fixexecutionreport] 34=236|49=T4|56=T4Example|50=T4FIX|52=20121212-18:05:58.023|143=US,IL|1=Account1|11=fr-634909107579297721|17=48199.71332626389_ESZ2.63490910779020000012.1.FA657BC9|150=5|37=FA657BC9-A1D2-4644-B558-A1155C731DA4|39=5|48=CME_20121200_ESZ2|55=ES|207=CME_Eq|200=201212|59=0|107=E-mini S&P 500 Dec12|54=1|167=FUT|38=1|40=2|44=143075|60=20121212-18:06:19.020|

[MsgSeqNum] 34 = 236
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20121212-18:05:58.023
[TargetLocationID] 143 = US,IL
[Account] 1 = Account1
[ClOrdID] 11 = fr-634909107579297721
[ExecID] 17 = 48199.71332626389_ESZ2.63490910779020000012.1.FA657BC9
[ExecType] 150 = 5 (REPLACE)
[OrderID] 37 = FA657BC9-A1D2-4644-B558-A1155C731DA4
[OrdStatus] 39 = 5 (REPLACED)
[SecurityID] 48 = CME_20121200_ESZ2
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201212
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Dec12
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 1
[OrdType] 40 = 2 (LIMIT)
[Price] 44 = 143075
[TransactTime] 60 = 20121212-18:06:19.020



FIX API Home Page.

Trade how you want, where you want

support@ctsfutures.com (312) 939 0164

2 Pierce Pl, Suite 200, Itasca, IL 60143

© 2009-2023 Cunningham Trading Systems LLC All rights reserved.